<div class="container">

        <h1 id="pkg-overview">package trace</h1>

        <p><code>import "runtime/trace"</code>

        </p><p>
Go execution tracer.
The tracer captures a wide range of execution events like goroutine
creation/blocking/unblocking, syscall enter/exit/block, GC-related events,
changes of heap size, processor start/stop, etc and writes them to an io.Writer
in a compact form. A precise nanosecond-precision timestamp and a stack
trace is captured for most events. A trace can be analyzed later with
'go tool trace' command.</p>


        
  


        
        

        

        

        
        
          
        

        
        


<p><a href="https://github.com/golang/go/blob/master/src/runtime/trace/trace.go">trace.go</a> </p>

        
        

        
        

        
        
        
          <h2 data-kind="f" id="Start">func <a href="https://github.com/golang/go/blob/master/src/runtime/trace/trace.go#L22" title="View Source">Start</a>  </h2>
          <p>
Start enables tracing for the current program.
While tracing, the trace will be buffered and written to w.
Start returns an error if tracing is already enabled.
</p>

          
  

        
          <h2 data-kind="f" id="Stop">func <a href="https://github.com/golang/go/blob/master/src/runtime/trace/trace.go#L40" title="View Source">Stop</a>  </h2>
          <p>
Stop stops the current tracing, if any.
Stop only returns after all the writes for the trace have completed.
</p>

          
<div class="clearfix" id="x-footer">
  <div class="container">
    <a href="http://studygolang.com/" target="_blank">Go语言中文网</a>
    <span class="text-muted">|</span> <a href="http://golang.org/" target="_blank">Go Language</a>
    <span class="pull-right"><a href="#">Back to top</a></span>
  </div>
</div>
<script src="../assets/jquery-2.0.3.min.js"></script>
<script src="../assets/bootstrap.min.js"></script>
<script src="../assets/site.js"></script>


</div>